package work20241221;

/**
 * @author zdl
 * @date 2024/12/21
 */
class My implements Runnable{
    @Override
    public void run() {

    }
}
public class Demo6 {
    public static void main(String[] args) {
        My my = new My();
        Thread thread = new Thread(my,"飞虎");
        thread.start();
        System.out.println(thread.getName()); //飞虎

        Thread thread1 = new Thread(my,"大炮");
        thread1.start();
        System.out.println(thread1.getName()); //大炮

    }
}
